<?php
/**
 * Object Relational Persistence Mapping Class for table: surgery_role
 *
 * @package	com.athena
 * @author	LHV
 */
class SurgeryRole extends ORDataObject {

	/**#@+
	 * Fields of table: surgery_role mapped to class members
	 */
	var $surgery_role_id		= '';
	var $name		= '';
	var $vi_name		= '';
	var $description		= '';
	/**#@-*/


	/**
	 * DB Table
	 */
	var $_table = 'surgery_role';

	/**
	 * Primary Key
	 */
	var $_key = 'Array';
	
	/**
	 * Internal Name
	 */
	var $_internalName = 'SurgeryRole';

	/**
	 * Handle instantiation
	 */
	function SurgeryRole() {
		parent::ORDataObject();
	}

	public function getRoleList() {
		$ds = new Datasource_sql();
		
		$sql = array(
			'cols'	=> "s.surgery_role_id, s.vi_name",
			'from'	=> "$this->_table s",			
			'orderby' => "s.surgery_role_id"
			);
		$ds->setup($this->_db, $sql);
		return $ds->toArray('surgery_role_id', 'vi_name');	
	}
	
}
?>
